<?php
include '../connect/common_start.php';
if(isset($_REQUEST['mem_id']))
{
	$mem_id=$_REQUEST['mem_id'];
	//echo  $user;
	if(isset($_REQUEST['mem_pswd']))
	{
		$mem_pswd=$_REQUEST['mem_pswd'];
		//echo  $passOld;
		if(isset($_REQUEST['mem_name']))
		{
			//echo $passNew;
			$mem_name=$_REQUEST['mem_name'];
			$mem_pic=$_REQUEST['mem_pic'];
			$mem_profile=$_REQUEST['mem_profile'];
				
			$check=mysql_query("SELECT * FROM member m WHERE m.mem_id='$mem_id'");
			if(mysql_num_rows($check)>0){
				echo '-1';
			}else{
				$result=mysql_query("INSERT INTO `member` (`mem_id`, `mem_pswd`, `mem_name`, `mem_pic`, `mem_profile`, `mem_joinday`, `status`) VALUES ('$mem_id', '$mem_pswd', '$mem_name', '$mem_pic', '$mem_profile', NOW(), '1')");
				echo mysql_affected_rows();
			}	
		}
	}
}
include '../connect/common_end.php';
?>
